# coding: utf-8
from module import globals as gbl
from requester.requester import Requester
from common_method import check_code_and_msg, check_zh_equal

REQUESTER = Requester(param='demo_service')

    # 查询用户信息
def query_user_info(msg=None):
    uri = "/api/user/info"
    resp = REQUESTER.get(url=uri, domain=gbl.LOCA_DOMAIN)
    return check_code_and_msg(resp, msg)

    # 注册
def register(data,msg=None):
    uri = "/api/auth/register"
    resp = REQUESTER.post(url=uri, data=data, domain=gbl.LOCA_DOMAIN)
    return check_code_and_msg(resp,msg)